{template 'common/header'}
<div class="main">
    <ul class="nav nav-tabs">
        <li><a href="{php echo $this->createWebUrl('activity');}">活动管理</a></li>
        <li class="active"><a href="{php echo $this->createWebUrl('addactivity');}">添加活动</a></li>
    </ul>
</div>       
<style>
.table td span{display:inline-block;margin-top:4px;}
.table td input{margin-bottom:0;}
</style>
<div class="clearfix">
<form class="form-horizontal form" action="" method="post" enctype="multipart/form-data">
    <div class="panel panel-default">
        <div class="panel-heading">活动信息编辑</div>
        <div class="panel-body">
                <input type="hidden" name="gameid" value="{$game['id']}">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'>*</span>游戏标题</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control" placeholder="" name="title" value="{$game['title']}">
                    	<span class="help-block"></span>
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'></span>游戏文字</label>
                    <div class="col-sm-8 col-xs-12">
                       <textarea name="g_text" class="form-control" style="margin: 0px -29.3438px 0px 0px; width: 615px; height: 150px;">{$game['g_text']}</textarea>
                    	<span class="help-block">一行一个 每行对应的数字 依次为 2 ， 4 ，8 ， 16 ， 32 ， 64 ， 128 ， 256 ， 512 ， 1024 ， 2048</span>
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'></span>奖项设置</label>
                    <div class="col-sm-8 col-xs-12">
                       <textarea name="prize" class="form-control" style="margin: 0px -29.3438px 0px 0px; width: 615px; height: 150px;">{$game['prize']}</textarea>
                    	<span class="help-block">一行一个 例子 一等奖|奖品名称|奖品图片（图片链接地址）</span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'></span>公告</label>
                    <div class="col-sm-8 col-xs-12">
                        <input type="text" class="form-control" placeholder="" name="g_desc" value="{$game['g_desc']}">
                    	<span class="help-block"></span>
                    </div>
                </div> 
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'></span>游戏说明</label>
                    <div class="col-sm-8 col-xs-12">
                       <textarea name="yxsm" class="form-control" style="margin: 0px -29.3438px 0px 0px; width: 615px; height: 150px;">{$game['yxsm']}</textarea>
                    	<span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'></span>奖品说明</label>
                    <div class="col-sm-8 col-xs-12">
                       <textarea name="p_shuoming" class="form-control" style="margin: 0px -29.3438px 0px 0px; width: 615px; height: 150px;">{$game['p_shuoming']}</textarea>
                    	<span class="help-block"></span>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label"><span style='color:red'></span>赞助说明</label>
                    <div class="col-sm-8 col-xs-12">
                       <textarea name="p_zanzhu" class="form-control" style="margin: 0px -29.3438px 0px 0px; width: 615px; height: 150px;">{$game['p_zanzhu']}</textarea>
                    	<span class="help-block"></span>
                    </div>
                </div>
<!--                <div class="form-group">
                        <label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>文字</label>
                        <div class="col-sm-9 col-xs-12">
                                <textarea style="height:200px; width:80%;" id='rule' class="form-control span7 richtext" name="cityinfo" cols="70">{$city['cityinfo']}</textarea>
                                <span class="help-block">介绍该城市的服务情况，例如范围、服务时间</span>
                        </div>
                </div>-->
                 <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">封面图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('hf_pic',$game['hf_pic']);}
                    </div>
                    
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">封面图用户关键词回复出现的封面</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">首页背景图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('bgpic',$game['bgpic']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">首页背景图 750x1260(不上传即为默认图片)</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">游戏页面顶部背景图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('g_tpic',$game['g_tpic']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">游戏页面顶部背景图 750x285(不上传即为默认图片)</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">游戏页面底部背景图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('g_bpic',$game['g_bpic']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">游戏页面底部背景图 750x917(不上传即为默认图片)</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">排行榜背景图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('phb_bg',$game['phb_bg']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">排行榜背景图 750x1788(不上传即为默认图片)</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">游戏说明图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('yxsm_pic',$game['yxsm_pic']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">游戏说明图 582x582(不上传即为默认图片)</div>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-4 col-md-3 col-lg-2 control-label">奖项背景图</label>
                    <div class="col-sm-8 col-xs-12">
                       {php echo tpl_form_field_image('prize_bg',$game['prize_bg']);}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
                    <div class="col-sm-9 col-xs-12">
                        <div class="help-block">奖项背景图 750x1788(不上传即为默认图片)</div>
                    </div>
                </div>

        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-12">
            <input name="submit" type="submit" value="提交" class="btn btn-primary col-lg-1">
            <input type="hidden" name="token" value="{$_W['token']}" />
        </div>
    </div>
</form>
</div>
<script type="text/javascript">
    var category = {php echo json_encode($children)};
    require(['jquery', 'util'], function($, u){
        $(function(){
            u.editor($('.richtext')[0]);
        });
        $('#credit1').click(function(){
            $('#credit-status1').show();
        });
        $('#credit0').click(function(){
            $('#credit-status1').hide();
        });
    });
</script>
{template 'common/footer'}